<div>
  <form class="form-horizontal" role="form" novalidate name="myForm"  ng-init="initQuery()">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:190px;" ng-class="{true: 'shou'}[!flag.state]" >
           <div>
          <label>时间</label>
          <md-input-container flex>
            <label>开始时间</label>
            <input type="month" ng-model="params.startTime"  time-validate="month" end-time="params.endTime" required
                   name="startDate">
            <div ng-messages="myForm.startDate.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div>
          <md-input-container flex>
            <label>结束时间</label>
            <input type="month" ng-model="params.endTime"  time-validate="month" start-time="params.startTime" required
                   name="endDate">
            <div ng-messages="myForm.endDate.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div >
          <label style="width:70px">工单类型</label>
          <md-select ng-model="params.workOrderTypeCode" placeholder="问题单">
            <md-option ng-value="item.workOrderTypeCode"   ng-repeat="item in workDataTypes">{{item.workOrderTypeName}}</md-option>
          </md-select>
        </div>
        <div style="margin-top:15px;width:350px;">
            <md-radio-group ng-model="params.changeTypeCode" class="md-primary" style="display:inline-block;">
              <md-radio-button value="1"  style="display: inline-block;">按科室统计</md-radio-button>
              <md-radio-button value="2"  style="display: inline-block;">按业务系统统计</md-radio-button>
            </md-radio-group>
        </div>
      </div>
      <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="flag.arrow" ng-click="flag.state = false"></i>
      <md-button ng-disabled="myForm.$invalid" ng-click="search()" class="md-fab md-primary md-hue-1" aria-label="Profile">
      <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;"  ng-show="!flag.state"></i>
      <i class="glyphicon glyphicon-search" ng-show="flag.state"></i>
      </md-button>
    </div>
  </form>
  <div class="table-info">
    <switching-button flag="flag" export-url="{{formPrefix}}" export-value="outData"></switching-button>
    <div ng-show="flag.show === 'view'">
      <div id="doc" style="height:450px;"></div>
    </div>
    <div>
    <div ng-show="flag.show === 'table'">
      <div class="table-detail" >
        <div class="t_r">
          <table class="table table-bordered">
          <caption style="text-align:center;font-size:large;font-weight:bold;color:black">{{send.title}}</caption>
          <thead>
            <tr>
              <th width="150px;">时间</th>
              <th ng-repeat="itemTh in item.tableTh">{{itemTh}}</th>
            </tr>
          </thead>
            <tbody>
              <tr ng-repeat="item in items">
               <td width="80px;">{{item.time}}</td>
                <td width="210px;" ng-repeat="ld in item.lineData" class="diffcount-td">
                  <div style="width:100%;">{{ld.percentage}}</div>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
  </div>
</div>